package com.hyts.apidoc.swagger.handler;

import sun.reflect.CallerSensitive;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.apidoc.swagger.handler
 * author:Libo/Alex
 * create-date:2019-05-17 11:03
 * email:liboware@gmail.com
 * description:此类主要用于: SwaggerApiDocHandler - swagger api doc处理器
 */
public class SwaggerApiDocHandler {


    @CallerSensitive
    public void test(){
        System.out.println("test");
    }

    @CallerSensitive
    public static void main(String[] args){
        try {
            System.out.println(sun.reflect.Reflection.getCallerClass(3));
            Method method = SwaggerApiDocHandler.class.getMethod("test");
            method.invoke(new SwaggerApiDocHandler(),null);
        } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
            e.printStackTrace();
        }
    }

}
